package com.frogs.ucenter.v1.request;

import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.util.OpenPlatformEnum;
import com.frogs.system.web.api.request.Request;
import com.frogs.system.web.exception.RequestIllegalException;

public class FollowedUserAttentionVerifyRequest extends Request {

	private int followUserId;
	
	private int followedUserId;
	
	private int openPlatformId;
	
	public FollowedUserAttentionVerifyRequest() {
	}
	
	@Override
	public void parse(HttpServletRequest request) {
		HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		this.followUserId = requestInfo.getIntParameter(ApiUrlParamEnum.followUserId.getParamName(), -1);
		if(followUserId < 0) {
			throw new RequestIllegalException("error followUserId: " + followUserId);
		}
		
		this.followedUserId = requestInfo.getIntParameter(ApiUrlParamEnum.followedUserId.getParamName(), -1);
		if(followedUserId < 0) {
			throw new RequestIllegalException("error followedUserId: " + followedUserId);
		}
		this.openPlatformId = requestInfo.getIntParameter(ApiUrlParamEnum.openPlatformId.getParamName(), OpenPlatformEnum.WECHAT_HDC.getId());
	}

	public int getFollowUserId() {
		return followUserId;
	}

	public void setFollowUserId(int followUserId) {
		this.followUserId = followUserId;
	}

	public int getFollowedUserId() {
		return followedUserId;
	}

	public void setFollowedUserId(int followedUserId) {
		this.followedUserId = followedUserId;
	}

	public int getOpenPlatformId() {
		return openPlatformId;
	}

	public void setOpenPlatformId(int openPlatformId) {
		this.openPlatformId = openPlatformId;
	}

}
